(()=>{var e,t,r={7:(e,t,r)=>{"use strict";r.d(t,{w:()=>a});var n=r(817),o=r(151);class a{constructor(e){this.expiryDay=1,this.storage=window.localStorage,this.adverId=e,this.key="ENP_CONFIG."+this.adverId}createConfig(){return e=this,t=void 0,a=function*(){let e;try{e=JSON.parse(this.getRawConfig()),this.validateConfig(e)}catch(t){if(e=yield(new n.K).get(`${o.H.cdnInfo.host.https+o.H.cdnInfo.pathName.config+this.adverId}.json`),!e)throw new Error("mobon adverId config file not found.");this.setConfig(e)}finally{o.H.solutionType=e.hostingType}},new((r=void 0)||(r=Promise))((function(n,o){function s(e){try{c(a.next(e))}catch(e){o(e)}}function i(e){try{c(a.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,i)}c((a=a.apply(e,t||[])).next())}));var e,t,r,a}getConfig(){return JSON.parse(this.getRawConfig())}setConfig(e){const t=Date.now()+864e5*this.expiryDay;e.expiry=t,this.storage.setItem(this.key,JSON.stringify(e))}getRawConfig(){const e=this.storage.getItem(this.key);if(e)return e}validateConfig(e){const t=void 0!==e,r=!this.hasExpired(e);if(!t||!r)throw""}hasExpired(e){try{return e.expiry{"use strict";r.d(t,{H:()=>n});class n{}n.cdnInfo={host:{https:"https://cdn.megadata.co.kr"},pathName:{config:"/dist/config/id/",custom:"/dist/config/custom/"}}},241:(e,t,r)=>{"use strict";r.d(t,{L:()=>n});class n{constructor(){this.referrerDomains=["mediacategory.com","clickon.kr","doem-0tpdlqj.com"],this.localStorageKey="enp_lc",this.sessionStorageKey="enp_lc",this.paramType={mobon:1,organic:2,others:3,complete:9}}getSessionLastClick(){try{const e=window.sessionStorage.getItem(this.sessionStorageKey);return Number(e)}catch(e){return 0}}setSessionLastClick(){try{if(0!==this.getSessionLastClick())return;const e=this.paramCheck();window.sessionStorage.setItem(this.sessionStorageKey,e.toString())}catch(e){return}}setSessionLastClickComplete(){window.sessionStorage.setItem(this.sessionStorageKey,this.paramType.complete.toString())}setLocalLastClick(){const e=document.referrer;e&&new URL(document.referrer).host!==new URL(location.href).host&&this.referrerDomains.some((t=>e.includes(t)))&&window.localStorage.setItem(this.localStorageKey,this.paramType.mobon.toString())}getLocalLastClick(){try{const e=window.localStorage.getItem(this.localStorageKey);return Number(e)}catch(e){return 0}}paramCheck(){const e=new URLSearchParams(window.location.search);if(0===e.size)return this.paramType.organic;const t=Array.from(e.values()),r=["mob","enp"];if(t.some((e=>r.some((t=>e.includes(t))))))return this.paramType.mobon;const n=["referral","direct","not set","not-set","notset","none"];return t.some((e=>n.some((t=>e.includes(t)))))?this.paramType.organic:this.paramType.others}}},285:(e,t,r)=>{"use strict";r.d(t,{w:()=>n});class n{constructor(){}static getMatchedString(e,t){const r=e.match(t);if(null!==r&&"string"==typeof r[0])return r[0];throw new Error("Not matched.")}static matchExactly(e,t){const r=e.match(t);return null!==r&&"string"==typeof r[0]}static isPermittedUrlFormat(e){return n.matchExactly(e,n.urlFormatRegex.permittedUrl)}static isDomainFormat(e){return n.matchExactly(e,n.urlFormatRegex.domain)}static getDomainFromUrl(e){try{return n.isDomainFormat(e)?e.match(/^(http[s]?:\/{2})?(www\.|m\.|mw\.)*([^/?:]+)/)[3]:""}catch(e){throw new Error("Invalid Domain format")}}static getPermittedUrl(e){if(n.isPermittedUrlFormat(e))return n.getMatchedString(e,n.urlFormatRegex.permittedUrl);throw new Error("Invalid URL format")}static getNonHTMLStr(e){return e.replace(/(<([^>]+)>)/gi,"")}static getNonNewLineStr(e){return e.replace(/\n|\\n/g," ")}static translateHTMLEntities(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/&nbsp;/g," ").replace(/ /g," ")).replace(/&quot;/g,'"').replace(/"/g,'"')).replace(/&lt;/g,"<").replace(/</g,"<")).replace(/&gt;/g,">").replace(/>/g,">")).replace(/&amp;/g,"&").replace(/&/g,"&")).replace(new RegExp(String.fromCharCode(34),"g"),'"')).replace(new RegExp(String.fromCharCode(38),"g"),"&")).replace(new RegExp(String.fromCharCode(60),"g"),"<")).replace(new RegExp(String.fromCharCode(62),"g"),">")).replace(new RegExp(String.fromCharCode(160),"g")," ")}static adverIdWithHideErr(e){const t=["hanatour_mkt"];for(let r of t)if(r===e)return!0;return!1}static escapeBracket(e){try{return e.replace(/\[/g,"\\[").replace(/]/g,"\\]")}catch(t){return e}}}n.urlFormatRegex={permittedUrl:/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w-._~:/?#[\]@!$&'()*+,;=%|]+$/,domain:/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/}},385:(e,t,r)=>{"use strict";r.d(t,{o:()=>l});var n=r(828),o=r(460),a=r(7),s=r(285),i=r(151);class c{constructor(e){this.adverId=e}dynamicModule(){return e=this,t=void 0,c=function*(){let e;const t=new a.w(this.adverId).getConfig().dataParser;if(t)e=yield r(994)(`./${t}`).then((e=>new e[`${t}`]));else switch(i.H.solutionType){case o.L9.CAFE24_SMART:e=yield r.e(390).then(r.bind(r,979)).then((e=>new e.Cafe24Mod));break;case o.L9.MAKESHOP_D2:e=yield r.e(985).then(r.bind(r,202)).then((e=>new e.MakeshopD2Mod));break;case o.L9.MAKESHOP_D4:e=yield r.e(211).then(r.bind(r,664)).then((e=>new e.MakeshopD4Mod));break;case o.L9.GODOMALL_SELF:e=yield r.e(538).then(r.bind(r,103)).then((e=>new e.GodomallSelfMod));break;case o.L9.GODOMALL_RENT:e=yield r.e(691).then(r.bind(r,824)).then((e=>new e.GodomallRentMod));break;case o.L9.FIRSTMALL:e=yield r.e(983).then(r.bind(r,84)).then((e=>new e.FirstMallMod));break;case o.L9.SHOP_BY:e=yield r.e(68).then(r.bind(r,973)).then((e=>new e.ShopByMod));break;case o.L9.SELF_HOSTED:case o.L9.IMWEB:e=s.w.adverIdWithHideErr(this.adverId)?yield r.e(772).then(r.bind(r,389)).then((e=>new e.SelfHostedMod)).catch((e=>null)):yield r.e(772).then(r.bind(r,389)).then((e=>new e.SelfHostedMod))}return e},new((n=void 0)||(n=Promise))((function(r,o){function a(e){try{i(c.next(e))}catch(e){o(e)}}function s(e){try{i(c.throw(e))}catch(e){o(e)}}function i(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}i((c=c.apply(e,t||[])).next())}));var e,t,n,c}}class l{constructor(e){this.adverId=e,this.customInfo=new n.R(this.adverId).getConfig(),this.module=this.getModuleData();try{this.currDocument=window.parent.document===document?document:window.parent.document}catch(e){this.currDocument=document}}getModuleData(){return e=this,t=void 0,n=function*(){return yield new c(this.adverId).dynamicModule()},new((r=void 0)||(r=Promise))((function(o,a){function s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,i)}c((n=n.apply(e,t||[])).next())}));var e,t,r,n}getValue(e,t=0){switch(e.tp){case"1":if(e.s){const r=(e,r)=>-1!==r.indexOf("[]")?e[r.split("[]")[0]][t]:e[r],n=e.s.split(".");let o=r(window,n[0]);if(o&&n.length>1)for(let e=1;e0)return r}return null}deepCopy(e){return"object"!=typeof e||null===e?e:e instanceof Date?new Date(e.getTime()):e instanceof Array?e.reduce(((e,t,r)=>(e[r]=this.deepCopy(t),e)),[]):e instanceof Object?Object.keys(e).reduce(((t,r)=>(t[r]=this.deepCopy(e[r]),t)),{}):void 0}addETCData(e,t={}){if(this.customInfo&&this.customInfo.etc&&this.customInfo.etc.length>0){const r=this.customInfo.etc,n=e=>{for(let r in e)"evt"!==r&&(t[r]=this.getValue(e[r]))};for(let t=0;t{"use strict";r.d(t,{Q:()=>D});var n=r(7),o=r(873),a=r(460);class s{constructor(){if(this.key={orderedProductList:"ENP_ORDER_PROD_LIST"},this.expiryHour=2,!s.sessionStorageSupported)throw new Error("not surport sessionStorage");this.storage=window.sessionStorage}static getInstance(){return s.instance||(s.instance=new s),s.instance}static whetherSessionSorageSupported(){try{return!!window.sessionStorage}catch(e){return!1}}createOrderCode(e){try{const t=e.paySys;let r="";switch(t){case a.mw.NAVER_PAY:r=a.mw.NAVER_PAY+"_";break;case a.mw.KAKAO_PAY:r=a.mw.KAKAO_PAY+"_";break;default:r="call"===e.convType?"Call_":"OrdNo_"}const n=this.getValidOrderedProduct(r,e);return this.getOrdCodeFromStorage(n,r)}catch(e){return""}}getOrdCodeFromStorage(e,t){if(!this.isValidOrderedProduct(e))throw"";return t+this.getOrderedTimeCode(e.time,e.elapsedTime)}getOrderedTimeCode(e,t){const r=(Math.floor(1e6*Math.random())-1).toString().padStart(6,"0");try{const n=t.toFixed(6).split("."),o=Number(n[0]),a=n.length>1?n[1]:r;return(e+o).toString(16)+a}catch(t){return e.toString(16)+r}}isValidOrderedProduct(e){let t=!0;return Object.keys(e).forEach((r=>{const n=void 0!==e[r],o=null!==e[r],a=e[r];t=t&&n&&o&&a})),t}getValidOrderedProduct(e,t){const r=this.getEncodedCurrProduct(t);let n=this.getOrderedProductList(),o={encodedProduct:r,time:Date.now(),elapsedTime:window.performance.now()};if("OrdNo_"!==e||"product"!==t.convType)return o;{let e=this.getRecentOrderedProduct(r);return null===e?(this.isOrderedProductNull(n)&&(n=[]),n.push(o),this.storage.setItem(this.key.orderedProductList,JSON.stringify(n))):o=e,o}}getRecentOrderedProduct(e){let t=this.getOrderedProductList(),r=null;if(this.isOrderedProductNull(t))return null;for(let n=0;nthis.expiryHour;return t||r}getDiffHour(e){return(Date.now()-e)/36e5}}s.sessionStorageSupported=s.whetherSessionSorageSupported();var i=r(151);class c{constructor(e,t){this.blockingRules=[],this.eventType=e,this.data=t,this.addRulesDefault()}blocked(){for(let e=0;e-1}}catch(e){return!1}}}class N{constructor(){this.STORAGE_KEY="_fcOM",this.expiryDay=730,this.storage=window.localStorage}setDataInStorage(e){if(!this.storage)return;let t={k:"",i:"",r:0};const r=e.parameters._auid,n=e.parameters._ip_info,o=(e,r)=>{t.k=e,t.i=r,t.r=Date.now()};try{const e=JSON.parse(this.storage.getItem(this.STORAGE_KEY));e?e.k!==r&&o(r,n):o(r,n)}catch(e){o(r,n)}finally{if(t.k){const e=JSON.stringify(t);this.storage.setItem(this.STORAGE_KEY,e),this.setFirstCookie(this.STORAGE_KEY,e)}}}setFirstCookie(e,t){const r=new Date;r.setDate(r.getDate()+this.expiryDay);let n=e+"="+t;n+="; EXPIRES="+r.toUTCString(),n+="; PATH=/",location.host.includes("gmarket.co.kr")?n+="; DOMAIN=.gmarket.co.kr":n+="; DOMAIN="+location.host,document.cookie=n}getAuIdDataFromStorage(){try{return JSON.parse(this.storage.getItem(this.STORAGE_KEY)).k}catch(e){return""}}getIpInfoFromStorage(){try{return JSON.parse(this.storage.getItem(this.STORAGE_KEY)).i}catch(e){return""}}}var R=r(817),C=r(983),T=r(494);class D{constructor(e,t,r){this.adverId=e,this.eventType=t,t===a.Bx.COMMON?this.parsingData=r||{}:this.parsingData=r}send(){this.parseAndSendData()}parseAndSendData(){return e=this,t=void 0,n=function*(){this.preSend(),this.addIndentification(),this.appendCrmData(),this.addRefferDomain(),this.validate()&&this.finish()},new((r=void 0)||(r=Promise))((function(o,a){function s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,i)}c((n=n.apply(e,t||[])).next())}));var e,t,r,n}finish(){const e=this.getAjaxPath();(new R.K).post(a.Xx.AGGREGATE,e,this.parsingData,((e,t)=>{e&&t&&(new N).setDataInStorage(e)}),this.getEventTimeout())}getAjaxPath(){let e="/aggregate/mssg/";switch(this.eventType){case a.Bx.COMMON:e+=a.Bx.COMMON;break;case a.Bx.PRODUCT:e+=a.Bx.PRODUCT;break;case a.Bx.CART:case a.Bx.WISH:e+=a.Bx.CART;break;case a.Bx.CONVERSION:e+=a.Bx.CONVERSION}return e}getEventTimeout(){switch(this.eventType){case a.Bx.COMMON:return 1800;case a.Bx.CART:case a.Bx.WISH:case a.Bx.CONVERSION:return 3e3}return null}validate(){try{return this.parsingData=(new k).validate(this.eventType,this.parsingData),!0}catch(e){return!1}}addIndentification(){const e=new N,t=e.getAuIdDataFromStorage(),r=e.getIpInfoFromStorage();"undefined"!==t&&"null"!==t&&t&&r&&this.addExtraData({identKey:t,identNumber:r})}preSend(){const e=C.e.getInstance(),t=new n.w(this.adverId).getConfig(),r={adverId:this.adverId,domain:this.parsingData.domain||l.w.getDomainFromUrl(window.location.href),charSet:document.characterSet,referrer:document.referrer?"null"===document.referrer?"":document.referrer:"",referrerDomain:l.w.getDomainFromUrl(document.referrer),cookieEnabled:!e.cookieEnabled||e.cookieEnabled,siteCode:t.siteCode,solutionType:t.hostingType,device:i.H.deviceType};this.addExtraData(r)}appendCrmData(){try{const e=new o.l(this.adverId).dynamicModuleLoad(this.eventType);return e&&Object.keys(e).length>0&&this.addExtraData({crmData:e}),!0}catch(e){return!1}}addExtraData(e){for(let t in e)this.parsingData[t]=e[t]}addRefferDomain(){const e=new T.m;this.eventType===a.Bx.COMMON&&e.setRefferDomain(),window.localStorage.getItem(e._fcTE)&&(this.parsingData[e._fcTE]=window.localStorage.getItem(e._fcTE))}addFirstEventTriggered(){(new T.m).getFirstEventTriggered(this.eventType)?this.addExtraData({isFirst:1}):delete this.parsingData.isFirst}}},460:(e,t,r)=>{"use strict";var n,o,a,s,i,c,l,d,u,h;r.d(t,{Bx:()=>n,L9:()=>o,TK:()=>c,Wg:()=>l,Xx:()=>h,aS:()=>d,bq:()=>a,dM:()=>u,mw:()=>s}),function(e){e.ALL="all",e.COMMON="common",e.PRODUCT="product",e.CART="cart",e.WISH="wish",e.CONVERSION="conversion"}(n||(n={})),function(e){e.CAFE24_SMART="cafe24_smart",e.MAKESHOP_D2="makeshop_d2",e.MAKESHOP_D4="makeshop_d4",e.FIRSTMALL="firstmall",e.GODOMALL_RENT="godomall_rent",e.GODOMALL_SELF="godomall_self",e.IMWEB="imweb",e.SELF_HOSTED="self_hosted",e.SHOP_BY="shopby"}(o||(o={})),function(e){e.MOBILE="M",e.WEB="W",e.BOTH="B"}(a||(a={})),function(e){e.NAVER_PAY="nPay",e.KAKAO_PAY="kaPay"}(s||(s={})),function(e){e.CART="cart",e.WISH="wish"}(i||(i={})),function(e){e.OWN_CART="ownCart",e.OWN_WISH="ownWish",e.NAVER_CART="naverCart",e.NAVER_WISH="naverWish",e.NAVER_TALK="naverTalk",e.KAKAO_WISH="kakaoWish",e.KAKAO_CHANNEL="kakaoChannel"}(c||(c={})),function(e){e.EXTERNAL="external",e.INTERNAL="internal",e.COMMON="common"}(l||(l={})),function(e){e.SESSION="session",e.INDIRECT="indirect"}(d||(d={})),function(e){e.PRODUCT="product",e.ETC="etc",e.JOIN="join",e.LOGIN="login",e.CALL="call"}(u||(u={})),function(e){e.AGGREGATE="aggregate",e.API="api"}(h||(h={}))},463:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,i)}c((n=n.apply(e,t||[])).next())}))},n=this&&this.__generator||function(e,t){var r,n,o,a,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:i(0),throw:i(1),return:i(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(s=0)),s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{"use strict";r.d(t,{m:()=>a});var n=r(285),o=r(460);class a{constructor(){this.storage=window.sessionStorage,this.localStorage=window.localStorage,this._fcTE="_fcTE",this.otherDomain="o",this.refferDomainKey="rd",this.refferDomainArrLength=5,this.rcteRefferDomainList=[{referrerDomain:"mediacategory.com",key:"m"},{referrerDomain:"doubleclick.net",key:"g"},{referrerDomain:"naver.com",key:"n"},{referrerDomain:"t1.daumcdn.net",key:"k"}],this.sessionKey="ENP_MEDIA",this.referrerDomainList=[{referrerDomain:"mediacategory.com",key:"m"},{referrerDomain:"naver.com",key:"n"},{referrerDomain:"t1.daumcdn.net",key:"k"},{referrerDomain:"kn.acrosspf.com",key:"a"},{referrerDomain:"ad.doyouad.com",key:"d"},{referrerDomain:"api.dable.io",key:"t"}],this.firstCallPrefixKey="_firstEvt_"}setSessionKey(){const e=this.getReferrerKey();e&&this.storage.setItem(this.sessionKey,e)}getSessionKey(){try{return this.storage.getItem(this.sessionKey)?this.storage.getItem(this.sessionKey):this.getReferrerKey()?this.getReferrerKey():""}catch(e){return""}}getReferrerKey(){const e=document.referrer,t=this.referrerDomainList;for(let r=0,n=t.length;rthis.refferDomainArrLength?t.slice(0,this.refferDomainArrLength):t}return[]}return[]}catch(e){return this.localStorage.removeItem(this._fcTE),[]}}getFcteRefferDomainKey(){const e=document.referrer,t=n.w.getDomainFromUrl(window.location.href);if(!e)return this.otherDomain;if(e.includes(t))return"";for(let t=0;t{"use strict";r.d(t,{R:()=>l});var n=r(460);class o{constructor(e){this.searchParamPairs={daum:["q"],naver:["q","query"],yahoo:["p","q"],msn:["q"],bing:["q"],zum:["query"]};const t=this.getHostnameFromUrl(e),r=this.getHostnameFromUrl(location.href);this.referrer=t!==r?e:""}extract(){try{let e="";const t=this.getHostnameFromUrl(this.referrer),r=this.getFieldNameInHostname(t);return this.searchParamPairs[r].forEach((t=>{e=this.getKeywordByParam(t,this.referrer),e.length})),e=e.replace(/[^-_\uAC00-\uD7A3xfe0-9a-zA-Z\u3131-\u314e\s]/g,""),{keyword:e,url:this.referrer}}catch(e){throw""}}getHostnameFromUrl(e){try{return new window.URL(e).hostname}catch(e){return""}}getFieldNameInHostname(e){return Object.keys(this.searchParamPairs).find((t=>-1!==e.indexOf(t)))}getKeywordByParam(e,t){try{const r=new URLSearchParams(new window.URL(t).search);return decodeURIComponent(r.get(e)||"")}catch(e){return""}}}class a{decodeURIforEUCKR(e){if(!this.isUrlEncoded(e))return e;const t=e.match(/%[0-9A-Fa-f]{2}/g);if(t){const r=new Uint8Array(t.map((e=>parseInt(e.slice(1),16))));return new TextDecoder("euc-kr").decode(r)+e.replace(/%[0-9A-Fa-f]{2}/g,"")}}isUrlEncoded(e){return/%[0-9A-Fa-f]{2}/g.test(e)}}var s=r(151);class i{constructor(e){this.searchParamPairs={cafe24_smart:["keyword"],makeshop_d2:["search"],makeshop_d4:["search"],firstmall:["osearchtext","search_text"],godomall_rent:["keyword"],godomall_self:["stx","sword"],imweb:["keyword"]},this.referrer=e}extract(){try{let e="";const t=s.H.solutionType,r=this.getFieldNameInHostingType(t),n=this.getExtractorURL(t);for(let t=0;t0));t++);return e=e.replace(/[^-_\uAC00-\uD7A3xfe0-9a-zA-Z\u3131-\u314e\s]/g,""),{keyword:e,url:this.referrer}}catch(e){throw""}}getExtractorURL(e){try{switch(e){case n.L9.MAKESHOP_D2:case n.L9.MAKESHOP_D4:return location.href;default:return document.referrer}}catch(e){return document.referrer}}getFieldNameInHostingType(e){return Object.keys(this.searchParamPairs).find((t=>t===e))}getKeywordByParam(e,t){const r=new URLSearchParams(new window.URL(t).search);if(!r)return"";const n=document.characterSet.toLocaleLowerCase();return"utf-8"==n?decodeURIComponent(r.get(e)||""):"euc-kr"==n?(new a).decodeURIforEUCKR(r.get(e)):r.get(e)}}class c{constructor(){this.key="ENP_KEYWORD",this.expiry=2}setItem(e,t,r,o){const a=0===Object.keys(t).length,s=0===(t.keyword||"").toString().length,i=0===(t.url||"").toString().length;if(!(a||s||i))try{this.storableKeyword={keywordValue:t.keyword,keywordType:r,keywordSessionType:e,keywordUrl:t.url,productCode:o||"",expired:this.getExpiredTimestring(e,this.expiry)};const a=this.getItem(e);let s=a[n.Wg.EXTERNAL],i=a[n.Wg.INTERNAL];switch(r){case n.Wg.EXTERNAL:s=this.storableKeyword;break;case n.Wg.INTERNAL:i=this.setInternalKeyword(this.storableKeyword,e)}return this.storingKeyword(e,s,i)}catch(e){return}}getItem(e){const t=(this.getStorage(e).getItem(this.key)||"").toString();return t.length>0?JSON.parse(decodeURIComponent(t)):""}setInternalKeyword(e,t){const r=this.getItem(t);try{const o=(e,t)=>{let r=!1;for(let n=0;n{const o=e[0]&&e[0].keywordType===n.Wg.COMMON;return t.keywordType=n.Wg.COMMON,r===n.aS.SESSION?(new Array).concat(t,o?e.slice(1):e):e};let s=!r[n.Wg.INTERNAL]||Object.keys(r).length<1?[]:r[n.Wg.INTERNAL];return e.productCode?o(s,e):a(s,e,t)}catch(e){return r[n.Wg.INTERNAL]}}removeExpiredItem(){try{const e=this.getItem(n.aS.INDIRECT);let t=e[n.Wg.EXTERNAL];t&&Object.keys(t).length>0&&this.hasExpired(t.expired)&&(t={});const r=e[n.Wg.INTERNAL];if(r&&Object.keys(r).length>0)for(let e=0;e0&&this.hasExpired(r[e].expired)&&r.splice(r.indexOf(r[e]),1);this.storingKeyword(n.aS.INDIRECT,t,r)}catch(e){localStorage.removeItem(this.key)}}storingKeyword(e,t,r){const n=encodeURIComponent(JSON.stringify({external:t,internal:r}));this.getStorage(e).setItem(this.key,n)}getStorage(e){switch(e){case n.aS.SESSION:return sessionStorage;case n.aS.INDIRECT:return localStorage;default:throw""}}hasExpired(e){try{return e0){e=this.getRefinedDataType(o);break}}return e}catch(e){return}}takeOutInternalKeyword(e,t){try{let r;if(!t)return;for(let o=0;o{"use strict";r.d(t,{S:()=>n});class n{constructor(){}static isNaN(e){return Number.isNaN?Number.isNaN(e):"number"==typeof e&&isNaN(e)}static parseNumber(e){try{if("number"==typeof e)return+e;const t=e.split("."),r=t[0].replace(/\D/g,""),n=t.length>1?"."+t[1].replace(/\D/g,""):"";return Number(r+n).valueOf()}catch(e){return NaN}}}},727:(e,t,r)=>{"use strict";r.d(t,{x:()=>a});var n=r(460),o=r(519);class a{constructor(){this.keywordManager=new o.R}getCommonKeyword(){try{const e={},t=new Object(this.keywordManager.takeOutExternalKeyword()),r=new Object(this.keywordManager.takeOutCommonInternalKeyword());return t.keywordValue&&"null"!==t.keywordValue&&(e.externalKeyword=t.keywordValue,e.externalKeywordHost=new window.URL(t.keywordUrl).host),r.keywordValue&&"null"!==r.keywordValue&&(e.internalKeyword=r.keywordValue),e}catch(e){return}}getCollectKeyword(e,t){try{const r={},n=new Object(this.keywordManager.takeOutExternalKeyword()),o=new Object(this.keywordManager.takeOutInternalKeyword(e,t));return n.keywordValue&&"null"!==n.keywordValue&&(r.externalKeyword=n.keywordValue,r.externalKeywordHost=new window.URL(n.keywordUrl).host),o.keywordValue&&"null"!==o.keywordValue&&(r.internalKeyword=o.keywordValue),r}catch(e){return}}getCartKeyword(e,t){try{const r=new Object,o=new Object(this.keywordManager.takeOutExternalKeyword());o.keywordValue&&"null"!==o.keywordValue&&(r.externalKeyword=n.Wg.EXTERNAL,r.externalKeywordValue=o.keywordValue,r.externalKeywordHost=new window.URL(o.keywordUrl).host);const a=new Object(this.keywordManager.takeOutInternalKeyword(e,t));return a.keywordValue&&"null"!==a.keywordValue&&(r.internalKeyword=n.Wg.INTERNAL,r.internalKeywordValue=a.keywordValue),r}catch(e){return}}getConversionExternalKeyword(){try{return new Object((new o.R).takeOutExternalKeyword())}catch(e){return}}getConversionInternalKeyword(e,t){try{const r=[];if(t){for(let n=0;n{"use strict";r.d(t,{K:()=>a});var n=r(460),o=function(e,t,r,n){return new(r||(r=Promise))((function(o,a){function s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,i)}c((n=n.apply(e,t||[])).next())}))};class a{constructor(){this.aggregationsURLs=["https://tk.mediacategory.com","https://tk.clickon.kr","https://tk.doem-0tpdlqj.com"],this.apiURLs=["https://api.mediacategory.com","https://api.clickon.kr","https://api.doem-0tpdlqj.com"],this.tryCnt=0}post(e,t,r,a,s=1500){return o(this,void 0,void 0,(function*(){try{let o=e===n.Xx.AGGREGATE?this.aggregationsURLs[this.tryCnt]:this.apiURLs[this.tryCnt];if(!o)return;return new Promise((()=>{window.fetch(o+t,{method:"post",mode:"cors",credentials:"include",cache:"no-cache",headers:{"ENP-Referrer":encodeURIComponent(document.referrer),"Content-Type":"application/json;charset=UTF-8"},signal:this.getTimeoutSignal(s),body:JSON.stringify(r)}).then((e=>200===e.status||201===e.status?e.json():null)).then((e=>(e?a(e,!0):a(null,!1),e))).catch((n=>{if(this.tryCnt>=this.aggregationsURLs.length-1)return a(null,!1),null;this.tryCnt+=1,this.post(e,t,r,a,s)}))}))}catch(e){a(null,!1)}}))}get(e,t=!1,r=1500){return o(this,void 0,void 0,(function*(){try{let n={method:"get"};return t&&(n.mode="cors",n.credentials="include",n.headers={"Content-Type":"application/json;charset=UTF-8"},n.signal=this.getTimeoutSignal(r)),new Promise((t=>{window.fetch(e,n).then((e=>200===e.status||201===e.status?e.json():null)).then((e=>t(e))).catch((e=>null))}))}catch(e){return null}}))}getTimeoutSignal(e){e||(e=1500);const t=new AbortController;return setTimeout((()=>{t.abort()}),e),t.signal}}},828:(e,t,r)=>{"use strict";r.d(t,{R:()=>s});var n=r(817),o=r(460),a=r(151);class s{constructor(e){this.expireMinute=30,a.H.deviceType||(a.H.deviceType=this.isMobile()?"M":"W"),this.adverId=e,this.sessionKey=`ENP_CUSTOM.${a.H.deviceType}.${this.adverId}`}createConfig(){return e=this,t=void 0,o=function*(){try{const e=this.getSessionItem();if(0===Object.keys(e).length){const e=yield(new n.K).get(`${a.H.cdnInfo.host.https+a.H.cdnInfo.pathName.custom+this.adverId}.json`);this.setSessionItem(e)}}catch(e){}},new((r=void 0)||(r=Promise))((function(n,a){function s(e){try{c(o.next(e))}catch(e){a(e)}}function i(e){try{c(o.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,i)}c((o=o.apply(e,t||[])).next())}));var e,t,r,o}getConfig(){return this.getSessionItem().data}setSessionItem(e){let t;switch(a.H.deviceType){case o.bq.WEB:t=e.w;break;case o.bq.MOBILE:t=e.m;break;case o.bq.BOTH:t=e.b}const r={expire:Date.now(),data:t};sessionStorage.setItem(this.sessionKey,JSON.stringify(r))}getSessionItem(){try{const e=this.sessionKey,t=JSON.parse(sessionStorage.getItem(e));return"string"==typeof t.data.cm&&(t.data.cm=JSON.parse(t.data.cm)),"string"==typeof t.data.npd&&(t.data.npd=JSON.parse(t.data.npd)),this.hasExpire(t)?{}:t}catch(e){return{}}}hasExpire(e){return this.getDiffMinute(e.expire)>this.expireMinute}getDiffMinute(e){return(Date.now()-e)/6e4}isMobile(){if(navigator.userAgent.indexOf("Mobi")>-1||navigator.userAgent.match(/Android|Mobile|iP(hone|od|ad)|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/))return!0;{const e=[/^m\.+/],t=[/\/m\//,/\/m2\//];for(let t=0;t-1)return!0;for(let e=0;e-1)return!0;return!1}}}},873:(e,t,r)=>{"use strict";r.d(t,{l:()=>u});var n=r(151),o=r(460);class a{constructor(e,t=""){this.LOGIN_ID="mobtune_login_id",this.USER_EXTRA_DATA="mobtune_user_extra",this.MOBTUNE_CONVERSION_URL="mobtune_conversion_url",this.COMMON_EXTRA_DATA="mobtune_common_extra",this.scriptSrc="",this.storage="s"===e?sessionStorage:localStorage,this.scriptSrc=t}getCommonExtraData(){let e={};return this.isOrderEndPage()&&this.removeOrderTryData(),this.isLoginPage()||this.isOrderFormPage()||(e=this.getCommonExtra()),this.isOrderFormPage()&&this.setOrderFormSessionStorage(),this.addUserInfo(e),e}getCartExtraData(){const e={};return this.addUserInfo(e),e}getConversionExtraData(){const e={};return this.addUserInfo(e),this.addBankInfo(e),this.addPayMethodInfo(e),e}addUserInfo(e){const t=this.getUserId();if(t&&Object.keys(t).length>0)for(let r in t)e[r]=t[r]}addBankInfo(e){const t=this.getBankInfo();if(t&&Object.keys(t).length>0)for(let r in t)e[r]=t[r]}addPayMethodInfo(e){const t=this.getPayMethodInfo();if(t&&Object.keys(t).length>0)for(let r in t)e[r]=t[r]}excuteScript(e){this.appendScript(),window.mobtune(e,"mobtuneCommon")}appendScript(){if(window.mobtune=window.mobtune||function(){(window.mobtune.q=window.mobtune.q||[]).push(arguments)},document.querySelectorAll("script[src*=mobtune_crm]").length<1&&this.scriptSrc)try{const e=document.getElementsByTagName("script")[0].parentNode,t=document.createElement("script");t.src="https://cdn.megadata.co.kr/crm_dist/prod/"+this.scriptSrc,t.type="text/javascript",t.defer=!0,t.async=!0,e.appendChild(t)}catch(e){}}removeOrderTryData(){const e=this.storage.getItem(this.COMMON_EXTRA_DATA);if(e){const t=JSON.parse(e);delete t.orderTryRoot,this.storage.setItem(this.COMMON_EXTRA_DATA,JSON.stringify(t))}}getCommonExtra(){const e=this.storage.getItem(this.COMMON_EXTRA_DATA);return e&&this.storage.removeItem(this.COMMON_EXTRA_DATA),e?JSON.parse(e):{}}}class s extends a{constructor(){super("s","mobtune_crm_cafe24.min.js")}isLoginPage(){return"/member/login.html"===location.pathname}isOrderFormPage(){return"/order/orderform.html"===location.pathname}isOrderEndPage(){return"order/order_result.html"===location.pathname}getUserId(){try{const e=JSON.parse(atob(this.storage.getItem("mobtune_member_common")));return e.userId?{userId:e.userId}:{}}catch(e){return{}}}getBankInfo(){try{const e=sessionStorage.getItem("mobonBankInfo").split(":");let t={};return t.bankNo=e[1],t.bankAccountHolder=e[2],t.bank=e[3],t.bankDepositor=e[5].trim(),t}catch(e){return{}}}getPayMethodInfo(){try{return sessionStorage.getItem("mobonPayMethod")?{paymentMethod:sessionStorage.getItem("mobonPayMethod")}:{}}catch(e){return{}}}setOrderFormSessionStorage(){try{document.querySelector("#btn_payment").addEventListener("click",(()=>{this.orderFormInfoSetting()}))}catch(e){}}orderFormInfoSetting(){try{const e=document.querySelector('[name="addr_paymethod"]:checked').disabled;if("cash"!==document.querySelector('[name="addr_paymethod"]:checked').value||e)sessionStorage.getItem("mobonBankInfo")&&sessionStorage.removeItem("mobonBankInfo");else{const e=document.querySelector("#bankaccount").selectedOptions[0].value+":"+document.querySelector("#pname").value;sessionStorage.setItem("mobonBankInfo",e)}e||sessionStorage.setItem("mobonPayMethod",document.querySelector('[name="addr_paymethod"]:checked').value)}catch(e){}}}class i extends a{constructor(){super("l","mobtune_crm_godomall_rent.min.js")}isLoginPage(){return"member/login.php"===location.pathname}isOrderFormPage(){return"/order/order.php"===location.pathname}isOrderEndPage(){return"/order/order_end.php"===location.pathname}getUserId(){const e=this.storage.getItem(this.LOGIN_ID);return e?{userId:atob(e)}:{}}getBankInfo(){try{let e=this.getLocalPaymentInfo();return delete e.paymentMethod,e.bankNo?{bankNo:decodeURIComponent(e.bankNo),bankAccountHolder:decodeURIComponent(e.bankAccountHolder),bank:decodeURIComponent(e.bank),bankDepositor:decodeURIComponent(e.bankDepositor)}:document.querySelector(".pay_with_list ul li")?{bankNo:document.querySelector(".pay_with_list ul li:nth-of-type(2)").textContent.split(":")[1].trim(),bankAccountHolder:decodeURIComponent(e.bankAccountHolder),bank:document.querySelector(".pay_with_list ul li:nth-of-type(1)").textContent.split(":")[1].trim(),bankDepositor:decodeURIComponent(e.bankDepositor)}:document.querySelector(".order_end_box ul li:nth-of-type(2)")?{bankNo:document.querySelector(".order_end_box ul li:nth-of-type(2)").childNodes[4].textContent.split(":")[1].trim(),bankAccountHolder:decodeURIComponent(e.bankAccountHolder),bank:document.querySelector(".order_end_box ul li:nth-of-type(2)").childNodes[2].textContent.split(":")[1].trim(),bankDepositor:decodeURIComponent(e.bankDepositor)}:{}}catch(e){return{}}}getPayMethodInfo(){try{let e=this.getLocalPaymentInfo();return e.paymentMethod?{paymentMethod:e.paymentMethod}:{}}catch(e){return{}}}getLocalPaymentInfo(){try{const e=window.localStorage.getItem("mobtune_payment_info");return e?JSON.parse(window.atob(e)):{}}catch(e){return{}}}setOrderFormSessionStorage(){}}class c extends a{constructor(){super("s","mobtune_crm_self_hosted.min.js")}isLoginPage(){return!1}isOrderFormPage(){return!1}isOrderEndPage(){return location.href.search(this.getOrderEndPageUrl())>-1}getUserId(){try{const e=JSON.parse(localStorage.getItem(this.USER_EXTRA_DATA));return e&&Object.keys(e).length>0?e:{}}catch(e){return{}}}getOrderEndPageUrl(){try{return localStorage.getItem(this.MOBTUNE_CONVERSION_URL)?localStorage.getItem(this.MOBTUNE_CONVERSION_URL).toString():""}catch(e){return""}}getBankInfo(){return{}}getPayMethodInfo(){return{}}setOrderFormSessionStorage(){}}class l extends a{constructor(){super("l","mobtune_crm_makeshop_d4.min.js")}isLoginPage(){return location.pathname.search(/member.html|login.html/)>-1}isOrderFormPage(){return location.pathname.search("order.html")>-1}isOrderEndPage(){return location.pathname.search(/order_complete.html|orderend.html/)>-1}getUserId(){const e=this.storage.getItem(this.LOGIN_ID);return e?{userId:atob(e)}:{}}getBankInfo(){try{let e=this.getLocalPaymentInfo();if(delete e.paymentMethod,e.bankNo)return{bankNo:decodeURIComponent(e.bankNo),bankAccountHolder:decodeURIComponent(e.bankAccountHolder),bank:decodeURIComponent(e.bank),bankDepositor:decodeURIComponent(e.bankDepositor)};if(document.querySelector("#bankname_banker")){const t=document.querySelector("#bankname_banker").parentElement.childNodes[0].textContent.split(" [");return{bankNo:t[1].trim().replace(/\D/g,""),bankAccountHolder:decodeURIComponent(e.bankAccountHolder),bank:t[0].trim(),bankDepositor:decodeURIComponent(e.bankDepositor)}}return{}}catch(e){return{}}}getPayMethodInfo(){try{let e=this.getLocalPaymentInfo();return e.paymentMethod?{paymentMethod:e.paymentMethod}:{}}catch(e){return{}}}getLocalPaymentInfo(){try{const e=window.localStorage.getItem("mobtune_payment_info");return e?JSON.parse(window.atob(e)):{}}catch(e){return{}}}setOrderFormSessionStorage(){}}class d extends a{constructor(){super("s")}isLoginPage(){return!1}isOrderFormPage(){return!1}isOrderEndPage(){return location.href.search(this.getOrderEndPageUrl())>-1}getUserId(){try{const e=JSON.parse(localStorage.getItem(this.USER_EXTRA_DATA));return e&&Object.keys(e).length>0?e:{}}catch(e){return{}}}getOrderEndPageUrl(){try{return localStorage.getItem(this.MOBTUNE_CONVERSION_URL)?localStorage.getItem(this.MOBTUNE_CONVERSION_URL).toString():""}catch(e){return""}}getBankInfo(){return{}}getPayMethodInfo(){return{}}setOrderFormSessionStorage(){}}class u{constructor(e){this.adverId=e}dynamicModuleLoad(e=""){let t;switch(n.H.solutionType){case o.L9.CAFE24_SMART:t=new s;break;case o.L9.MAKESHOP_D2:case o.L9.MAKESHOP_D4:t=new l;break;case o.L9.GODOMALL_RENT:case o.L9.GODOMALL_SELF:t=new i;break;case o.L9.SELF_HOSTED:t=new d;break;case o.L9.IMWEB:t=new c;break;default:return}switch(n.H.solutionType===o.L9.SELF_HOSTED||e||t.excuteScript(this.adverId),e){case o.Bx.COMMON:return t.getCommonExtraData();case o.Bx.CART:case o.Bx.WISH:return t.getCartExtraData();case o.Bx.CONVERSION:return t.getConversionExtraData();default:return{}}}}},983:(e,t,r)=>{"use strict";r.d(t,{e:()=>n});class n{constructor(){this._cookieEnabled=!0,this.detectNation(),this.detectCookieEnabled()}get nation(){return this._nation}get cookieEnabled(){return this._cookieEnabled}static getInstance(){return n.instance||(n.instance=new n),n.instance}detectNation(){this._nation="KR"}detectCookieEnabled(){try{this._cookieEnabled=void 0===navigator.cookieEnabled||navigator.cookieEnabled}catch(e){this._cookieEnabled=!0}}}},994:(e,t,r)=>{var n={"./CeragemonDataParser":[761,699],"./CeragemonDataParser.ts":[761,699],"./Dmcmedia08DataParser":[888,638],"./Dmcmedia08DataParser.ts":[888,638],"./GanaesraDataParser":[728,402],"./GanaesraDataParser.ts":[728,402],"./SpaziomodernoDataParser":[128,980],"./SpaziomodernoDataParser.ts":[128,980]};function o(e){if(!r.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],o=t[0];return r.e(t[1]).then((()=>r(o)))}o.keys=()=>Object.keys(n),o.id=994,e.exports=o}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return r[e].call(a.exports,a,a.exports,o),a.exports}o.m=r,o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,r)=>(o.f[r](e,t),t)),[])),o.u=e=>({68:"shopByMod",211:"makeshopD4Mod",297:"productParser",390:"cafe24Mod",402:"GanaesraDataParser",538:"godomallSelfMod",578:"payParser",638:"Dmcmedia08DataParser",691:"godomallRentMod",699:"CeragemonDataParser",772:"selfHostedMod",854:"conversionParser",980:"SpaziomodernoDataParser",983:"firstMallMod",985:"makeshopD2Mod"}[e]+".bundle.js"),o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="agent_v2:",o.l=(r,n,a,s)=>{if(e[r])e[r].push(n);else{var i,c;if(void 0!==a)for(var l=document.getElementsByTagName("script"),d=0;d{i.onerror=i.onload=null,clearTimeout(m);var o=e[r];if(delete e[r],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),t)return t(n)},m=setTimeout(h.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=h.bind(null,i.onerror),i.onload=h.bind(null,i.onload),c&&document.head.appendChild(i)}},o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={329:0};o.f.j=(t,r)=>{var n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var a=new Promise(((r,o)=>n=e[t]=[r,o]));r.push(n[2]=a);var s=o.p+o.u(t),i=new Error;o.l(s,(r=>{if(o.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;i.message="Loading chunk "+t+" failed.\n("+a+": "+s+")",i.name="ChunkLoadError",i.type=a,i.request=s,n[1](i)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,a,[s,i,c]=r,l=0;if(s.some((t=>0!==e[t]))){for(n in i)o.o(i,n)&&(o.m[n]=i[n]);c&&c(o)}for(t&&t(r);l{"use strict";var e=o(7),t=o(828),r=o(494),n=o(463),a=o.n(n),s=o(817),i=o(460);class c{constructor(){this.STORAGE_KEY="_iOrbExpiry",this.STORAGE_KEY_G="_iOrbExpiry_g",this.API_PATH="/rtb/redirectUrl"}callApi(){return e=this,t=void 0,n=function*(){try{this.kakaoApiCallFlag()&&(new s.K).post(i.Xx.API,this.API_PATH,{t:"k"},((e,t)=>{if(t){const t=e;if(t&&(t.status&&t.redirectUrl_k&&this.callUrlByIframe(t.redirectUrl_k),t.send_rtb_date)){const e=JSON.parse(localStorage.getItem(this.STORAGE_KEY));e.d=this.getDateTime(t.send_rtb_date,14),localStorage.setItem(this.STORAGE_KEY,JSON.stringify(e))}}})),this.googleApiCallFlag()&&(new s.K).post(i.Xx.API,this.API_PATH,{t:"g"},((e,t)=>{if(t){const t=e;if(t&&(t.status&&t.redirectUrl_g&&this.callUrlByIframe(t.redirectUrl_g),t.send_rtb_date_g)){const e=JSON.parse(localStorage.getItem(this.STORAGE_KEY_G));e.d=this.getDateTime(t.send_rtb_date_g,14),localStorage.setItem(this.STORAGE_KEY_G,JSON.stringify(e))}}}))}catch(e){}},new((r=void 0)||(r=Promise))((function(o,a){function s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,i)}c((n=n.apply(e,t||[])).next())}));var e,t,r,n}kakaoApiCallFlag(){if(!localStorage)return!1;const e=localStorage.getItem(this.STORAGE_KEY);if(e){if(-1===e.indexOf("{")){const e={v:1,d:0};return localStorage.setItem(this.STORAGE_KEY,JSON.stringify(e)),!1}const t=JSON.parse(e),r=Number(t.d);return r>0?r=3)}{const e={v:1,d:0};return localStorage.setItem(this.STORAGE_KEY,JSON.stringify(e)),!1}}googleApiCallFlag(){if(!localStorage)return!1;const e=localStorage.getItem(this.STORAGE_KEY_G);if(e){const t=JSON.parse(e),r=Number(t.d);return r>0?r=3)}{const e={v:1,d:0};return localStorage.setItem(this.STORAGE_KEY_G,JSON.stringify(e)),!1}}getDateTime(e,t){const r=new Date(e.replace(/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/,"$1-$2-$3 $4:$5:$6"));return r.setDate(r.getDate()+t)}callUrlByIframe(e){const t=document.createElement("iframe");if(t.src=e,t.style.display="none",t.width="0",t.height="0",document.body)document.body.appendChild(t);else{const e=document.getElementsByTagName("html")[0],r=document.createElement("body");e.appendChild(r),r.appendChild(t)}}}class l{constructor(e,t){this.freqName="_turl_f",this.freqHour=24,this.freqCnt=5,this.adverId=e,this.siteCode=t}tUrlSetting(){this.getFrequency()&&(new s.K).post(i.Xx.API,"/adSiteUrlInfo/turl",{userId:this.adverId,siteCode:this.siteCode},((e,t)=>{if(t){const t=e;if(t.url1){const e=location.href;history.pushState(null,"",e),window.addEventListener("popstate",(function(){window.location.href=t.url1})),this.setFrequency()}}}))}setFrequency(){if(localStorage){let e;if(localStorage.getItem(this.freqName)){const t=localStorage.getItem(this.freqName);e=JSON.parse(t),e.cnt+=1}else e={cDate:Date.now(),cnt:1};localStorage.setItem(this.freqName,JSON.stringify(e))}}getFrequency(){if(localStorage){const e=localStorage.getItem(this.freqName);if(e){const t=JSON.parse(e),r=(Date.now()-t.cDate)/1e3/3600,n=t.cnt;if(r>this.freqHour)return localStorage.removeItem(this.freqName),!0;if(n>this.freqCnt)return!1}}return!0}}var d=o(727),u=o(241),h=o(432);class m extends h.Q{constructor(e,t,r){super(e,t,r)}preSend(){super.preSend(),this.addSessionReferrer(),this.addExtraData({url:location.href}),this.addExtraData((new d.x).getCommonKeyword()),this.addExtraData({ver:"03"}),this.addLastClick()}addSessionReferrer(){const e=(new r.m).getSessionKey();e&&this.addExtraData({referrerClick:e})}addLastClick(){const e=new u.L,t=e.getSessionLastClick(),r=e.getLocalLastClick();this.addExtraData({slc:t}),this.addExtraData({llc:r})}finish(){super.finish(),this.callKakaoRTB(),this.deleteMhhkParam(),this.callTUrlInfoApi(),(new u.L).setSessionLastClickComplete()}callKakaoRTB(){(new c).callApi()}deleteMhhkParam(){let e=new window.URL(location.href);e.searchParams.has("mhhk")&&(e.searchParams.delete("mhhk"),history.replaceState({},"",e.href))}callTUrlInfoApi(){let e=new window.URL(location.href);if(e.searchParams.has("mobsc")){const t=e.searchParams.get("mobsc");e.searchParams.delete("mobsc"),history.replaceState(null,"",e.href),new l(this.adverId,t).tUrlSetting()}}}var p=o(385);class g extends p.o{constructor(e){super(e),this.commonData={},this.excute()}excute(){return e=this,t=void 0,n=function*(){try{const e=yield a()();e.isPrivate&&(this.commonData.secret=e.isPrivate)}catch(e){}this.otherDomain(),this.addETCData(i.Bx.COMMON,this.commonData),this.commonSend()},new((r=void 0)||(r=Promise))((function(o,a){function s(e){try{c(n.next(e))}catch(e){a(e)}}function i(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,i)}c((n=n.apply(e,t||[])).next())}));var e,t,r,n}commonSend(){new m(this.adverId,i.Bx.COMMON,this.commonData).send()}otherDomain(){try{const e=this.customInfo.cm,t=location.href;for(let r=0;r{e.send="Y",window.sessionStorage.setItem(this.STORAGE_KEY,JSON.stringify(e))}))}sendMobaDataAfterDelay(e,t){setTimeout((()=>{this.sendMobaData(e)}),t)}firstSetMobaData(){const e=new URLSearchParams(window.location.search).get(this.PARAM_KEY);if(!e)return;this.removeMobaParamFromHistory();const t={time:Date.now().toString(),moba:e,send:"N"};window.sessionStorage.setItem(this.STORAGE_KEY,JSON.stringify(t)),this.monitorPageStayTime()}removeMobaParamFromHistory(){const e=new window.URL(window.location.href);e.searchParams.has(this.PARAM_KEY)&&(e.searchParams.delete(this.PARAM_KEY),history.replaceState(null,"",e.href))}}class O{constructor(e,t={}){this.callMtmOptions={},this.manualConv=!1,this.adverId=e,this.callMtmOptions=t,(this.callMtmOptions.productName||this.callMtmOptions.convType)&&(this.manualConv=!0),this.defaultSetting()}executeCommand(){this.getAdverConfig(),this.eventCommand()}getAdverConfig(){const e=new t.R(this.adverId);this.customInfo=e.getConfig()}eventCommand(){var e;this.manualConv||this.callMtmOptions.onlyEvent||this.callMtmOptions.productCode||new g(this.adverId),new y.l(this.adverId).dynamicModuleLoad(),e=()=>{this.callProduct(),this.callBakset(),this.callConversion()},"interactive"===document.readyState||"complete"===document.readyState?e():document.addEventListener("DOMContentLoaded",e)}callProduct(){try{let e=!1;const t=(t,r=!1)=>{S.w.adverIdWithHideErr(this.adverId)?(e=!0,o.e(297).then(o.bind(o,237)).then((e=>{new e.ProductParser(this.adverId,t,r)})).catch((e=>{}))):(e=!0,o.e(297).then(o.bind(o,237)).then((e=>{new e.ProductParser(this.adverId,t,r)})))},r=()=>{if("Y"===this.customInfo.sy)if(!0===this.callMtmOptions.onlyEvent)t(this.customInfo.pd,!0);else{const e=this.customInfo.pd.p;this.passUrl(e)&&(this.verificationUrl(e)||this.isAutoScript(i.Bx.PRODUCT))&&t(this.customInfo.pd)}else if("N"===this.customInfo.sy){if(this.callMtmOptions.convType)return!1;const e=!0===this.callMtmOptions.onlyEvent;if(this.callMtmOptions.productCode){const r={pdc:this.callMtmOptions.productCode,cb:this.callMtmOptions.cartBtn||""};t(r,e)}else{const r=this.customInfo.npd;for(let n=0;n{r(),t++,(e||10===t)&&clearInterval(n)}),1e3)}}catch(e){}}callBakset(){try{let e=!1;const t=()=>{S.w.adverIdWithHideErr(this.adverId)?this.passUrl(this.customInfo.bk.p)&&(this.verificationUrl(this.customInfo.bk.p)||this.isAutoScript(i.Bx.CART))&&(e=!0,o.e(578).then(o.bind(o,74)).then((e=>{new e.PayParser(this.adverId,"basket")})).catch((e=>{}))):this.passUrl(this.customInfo.bk.p)&&(this.verificationUrl(this.customInfo.bk.p)||this.isAutoScript(i.Bx.CART))&&(e=!0,o.e(578).then(o.bind(o,74)).then((e=>{new e.PayParser(this.adverId,"basket")})))};if(t(),!e){let r=0;const n=setInterval((()=>{t(),r++,(e||10===r)&&clearInterval(n)}),1e3)}}catch(e){}}callConversion(){try{let e=!1;const t=this.customInfo.cv,r=t=>{S.w.adverIdWithHideErr(this.adverId)?(e=!0,o.e(854).then(o.bind(o,954)).then((e=>{new e.ConversionParser(this.adverId,t)})).catch((e=>{}))):(e=!0,o.e(854).then(o.bind(o,954)).then((e=>{new e.ConversionParser(this.adverId,t)})))},n=()=>{if(this.manualConv){const e={clk:this.callMtmOptions.click||"",ct:this.callMtmOptions.convType||"etc",pdn:this.callMtmOptions.productName||""};r(e)}let e=!1,n="";for(let o=0;o{n(),t++,(e||10===t)&&clearInterval(r)}),1e3)}}catch(e){}}defaultSetting(){(new r.m).setSessionKey(),this.extractExternalKeyword();const e=new u.L;e.setLocalLastClick(),e.setSessionLastClick(),(new I).setMobaData()}extractExternalKeyword(){const e=new f.R;e.storeExternalKeyword(),e.storeInternalKeyword("")}passUrl(e){const t=location.href,r=e.split(",");for(let e=0;e0}}}(window.CallMtmExcute=(r={})=>{const n=r=>{const n=n=>{return o=void 0,a=void 0,i=function*(){yield new e.w(n).createConfig(),yield new t.R(n).createConfig(),new O(n,r).executeCommand()},new((s=void 0)||(s=Promise))((function(e,t){function r(e){try{c(i.next(e))}catch(e){t(e)}}function n(e){try{c(i.throw(e))}catch(e){t(e)}}function c(t){var o;t.done?e(t.value):(o=t.value,o instanceof s?o:new s((function(e){e(o)}))).then(r,n)}c((i=i.apply(o,a||[])).next())}));var o,a,s,i},o=document.querySelector('script[src*="/v2/mtm.js"]'),a=new URLSearchParams(new window.URL(o.src).search);if(w.H.deviceType=a.get("device"),r.adverId)n(r.adverId);else{const e=a.getAll("adverId");let t="";for(let r=0;r0){let e=!1,t={};for(;window.CallMtm.q.length>0;)t=window.CallMtm.q.shift()[0]||{},0===Object.keys(t).length&&(e=!0),n(t);e||n({})}else n(r)})(),window.CallMtm=window.CallMtmExcute||function(){(window.CallMtm.q=window.CallMtm.q||[]).push(arguments)}})()})();